package lyj.springcloud.feign;

import com.lyj.springcloud.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @FeignClient(value = "CLOUD-PAYMENT-SERVICE"): feign的注解，value=微服务名
 */
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    /**
     * 调用payment8001服务接口
     * @return
     */
    @GetMapping("/payment/linkFeign")
    public CommonResult linkFeign();

    /**
     * 测试feign负载均衡
     */
    @GetMapping("/payment/mylb")
    public CommonResult<String> myLb();
}
